package com.iwhalecloud.citybrain.flow.platform.manager.common;

import lombok.Data;

/**
 * @author liyang
 * @version 1.0
 * @date 2021-08-06 10:46:30
 **/
@Data
public class CheckResult {

    private boolean success = true;
    private int code;
    private String msg;

    public CheckResult(boolean success,int code, String msg) {
        this.success = success;
        this.code = code;
        this.msg = msg;
    }

    public static CheckResult fail(int code, String msg){
        return new CheckResult(false,code,msg);
    }

    public static CheckResult success(){
        return new CheckResult(true,0,null);
    }
}
